﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Ylh.IDAL
{
    public interface IStaff
    {
        DataTable IsLogin(string ConStr, string LoginName, string Pwd);
        int InsertInStaff(string ConStr, Ylh.Model.TbStaff model);
        bool UpdateStaff(string ConStr, string StaffName, string staffID, string DepartmentID);
        DataTable GetStaffData(string ConStr, string DepartmentID);
        /// <summary>
        /// 根据员工编号删除员工信息
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="StaffID">员工编号</param>
        /// <returns></returns>
        bool Delete(string ConStr, int StaffID);
        /// <summary>
        /// 根据员工编号获得员工信息
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="StaffID">员工编号</param>
        /// <returns></returns>
        DataTable GetStaff(string ConStr, int StaffID);
        /// <summary>
        /// 判断员工下面是否有客户
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="StaffID">员工编号</param>
        /// <returns></returns>
        bool hasCust(string ConStr, int StaffID);
        bool UpdateStaffRole(string ConStr, int StaffID, string RoleID);
        /// <summary>
        /// 更新员工是否离职
        /// </summary>
        /// <param name="ConStr"></param>
        /// <param name="StaffID">员工编号</param>
        /// <param name="IsDeparture">是否离职</param>
        /// <returns></returns>
        bool UpdateStaffDeparture(string ConStr, int StaffID, bool IsDeparture);

        /// <summary>
        /// 更新员工密码
        /// </summary>
        /// <param name="StaffID">员工ID</param>
        /// <param name="oldPwd">旧密码</param>
        /// <param name="newPwd">新密码</param>
        /// <returns></returns>
        int UpdateStaffPwd(string ConStr, int StaffID, string oldPwd, string newPwd);


        int UpdateStaffPwd(string ConStr, int StaffID, string newPwd);
       
    }
}
